<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        // new关键字的执行过程
        function Posern(name, age, sex, address) {
            this.name = name;
            this.age = age;
            this.sex = sex;
            this.address = address;
        }
        var zzq = new Posern('zzq',21,'男','河南省汤阴县白营镇白营村');
        // 1.new关键字在内存中先创建一个新的空对象，
        // 2.this关键词指向新创建的对象
        // 3.执行构造函数中的代码，为对象赋值
        // 4.返回这个对象
    </script>
</body>

</html>